#!/usr/bin/env python
# coding: utf-8




count = 3
for i in range(3):
    username = input('username:')
    password = input('password:')
    if (username == 'test') and (password == '123456'):
        print('Welcome to magedu!')
        break
    else:
        count -=1
        print('用户名密码错误,请重新输入,您还有',count,'次机会')


# print() 是个方法，最好不要有空行


